<template>
  <el-aside width="200px">
    <el-menu
      :default-active="$route.path"
      class="el-menu-vertical-demo"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      :router="true"
    >
      <el-menu-item :index="item.path" v-for="item in menulist" :key="item.id">
          <i :class="item.icon"></i>
          <span slot="title">{{item.title}}</span>
      </el-menu-item>
    </el-menu>
  </el-aside>
</template>

<script>
export default {
  data() {
    return {
      menulist:[
        {
          id:1,
          path:'/home',
          icon:'el-icon-s-home',
          title:'首页'
        },
        {
          id:2,
          path:'/member',
          icon:'el-icon-s-custom',
          title:'用户管理'
        },
        {
          id:3,
          path:'/totalType',
          icon:'el-icon-s-grid',
          title:'商品总类型管理'
        },
        {
          id:4,
          path:'/goodsType',
          icon:'el-icon-menu',
          title:'商品类型管理'
        },
        {
          id:5,
          path:'/goods',
          icon:'el-icon-menu',
          title:'商品管理'
        },
        {
          id:6,
          path:'/order',
          icon:'el-icon-s-order',
          title:'订单管理'
        }
      ]
    };
  },

  components: {},

  methods: {}
};
</script>

<style scoped lang='scss'>
@import '~@/assets/scss/appMenu.scss';
</style>